const http = require('http');

const server = http.createServer((req, res) => {
    res.writeHead(200, {
        'access-control-allow-origin': 'http://127.0.0.1:5500', // 允许所有域名跨域
    })
    res.end('hello world');
})

server.listen(3000)